﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ODailyreportPage.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.MacModel.testreport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td { padding:0; margin:0; font-size:12px; line-height:100%; font-family:Arial, sans-serif;}
table{}
        .table{ border:1px solid #000; border-collapse:collapse;}
        .table th{ text-align:center; line-height:25px;border:1px solid #000;}
        .table td{ text-align:left; line-height:16px;border:1px solid #000;}
    </style>
    <script src="../js/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="../js/dwz.core.js" type="text/javascript"></script>
<script src="../js/dwz.util.date.js" type="text/javascript"></script>
    <script>
        $(function () {
            $("a[target=navTab]").each(function () {
                $(this).click(function (event) {
                    var $this = $(this);
                    var title = $this.attr("title") || $this.text();
                    var tabid = $this.attr("rel") || "_blank";
                    var fresh = eval($this.attr("fresh") || "true");
                    var external = eval($this.attr("external") || "false");
                    var url = unescape($this.attr("href"));//.replaceTmById($p);
                   //DWZ.debug(url);
                    if (!url.isFinishedTm()) {
                        alertMsg.error($this.attr("warn") || DWZ.msg("alertSelectMsg"));
                        return false;
                    }
                    parent.navTab.openTab(tabid, url, { title: title, fresh: fresh, external: external });

                    event.preventDefault();
                });
            });

        });
      
    </script>
</head>
<body>
    <form id="form1" runat="server">
    
 
   
    <% if(ReportType=="1") {%>
     <table width="100%">
     <tr>
     <td  valign="top" colspan="2">
        <asp:chart id="MachineTaskTimeChart" runat="server" Width="750px" 
            BackImageWrapMode="Scaled" BackSecondaryColor="DimGray" ImageType="Jpeg" 
             Height="350px" Palette="Chocolate"><Series>
            <asp:Series Name="Series1" IsValueShownAsLabel="True" XValueType="String" 
                YValueType="Single" ChartArea="ChartArea1" LabelFormat="{f2}"></asp:Series></Series><ChartAreas><asp:ChartArea Name="ChartArea1" >
                <AxisY ArrowStyle="Triangle" TextOrientation="Stacked" Title="每台机器平均直接工时/小时" 
                    TitleAlignment="Far" IntervalAutoMode="VariableCount">
                </AxisY>
                <AxisX ArrowStyle="Triangle" Title="项目(台数)" 
                    TitleFont="新宋体, 10.5pt" IsLabelAutoFit="False" 
                    MaximumAutoSize="50" IntervalAutoMode="VariableCount" 
                    LabelAutoFitMaxFontSize="8" 
                    LabelAutoFitStyle="IncreaseFont, DecreaseFont, StaggeredLabels, LabelsAngleStep30, LabelsAngleStep45, WordWrap" 
                    TitleAlignment="Far" TitleForeColor="Red"  >
                    <LabelStyle IsEndLabelVisible="False" IsStaggered="True" />
                </AxisX>
                <AxisX2 Enabled="False" IntervalAutoMode="VariableCount">
                </AxisX2>
                <AxisY2 Enabled="False">
                </AxisY2>
                </asp:ChartArea></ChartAreas>
            <Titles>
                <asp:Title Font="楷体, 12pt, style=Bold" Name="Title1" Text="每个项目中每台机器的平均直接工时统计">
                </asp:Title>
                <asp:Title ForeColor="Red" Name="TaskTimeTitle" Text="从总共时30分钟">
                </asp:Title>
            </Titles>
        </asp:chart>
    </td>
    </tr>
    <tr>
        <td align="center">每个项目中每台机器的直接工时平均值</td>
        <td align="center">每种机型单台直接工时平均值</td>
    </tr>
    <tr>
     <td  valign="top">
        <asp:repeater id="rpMachineTaskTimeChart" runat="server">
        <HeaderTemplate>
            <table class="table" width="100%" >
            <thead>
                <tr  >  
                    <th width="80" align="center">
                        项目(台数)
                    </th>
                    <th width="80">
                        单台平均直接工时(小时)
                    </th>                
                </tr>
            </thead>
            <tbody>
         </HeaderTemplate>
         <ItemTemplate>
                <tr target="sid_user" >			
				    <td><a target="navTab" title="项目<%# Eval("SerialNumber") %>日报表" rel="viewdlkilyserver<%# Eval("SerialNumber")%>" fresh="true" href="MacModel/ODailyList.aspx?SerialNumber=<%# Eval("SerialNumber") %>"><%# Eval("SerialNumberNum")%></a></td>
				    <td><%# Convert.ToDecimal( Eval("TaskTime")).ToString("f2")%></td>
			    </tr>
         </ItemTemplate>
         <FooterTemplate>
                </tbody>
             </table>
         </FooterTemplate>
        </asp:repeater>
    </td>
     <td valign="top">
        <asp:repeater id="rpMachineTaskTimeChart2" runat="server">
        <HeaderTemplate>
            <table class="table" width="100%" >
            <thead>
                <tr  >  
                    <th width="80" align="center">
                        机型(台数)
                    </th>
                    <th width="80">
                        单台平均直接工时(小时)
                    </th>                
                </tr>
            </thead>
            <tbody>
         </HeaderTemplate>
         <ItemTemplate>
                <tr  >			
				    <td><%# Eval("MachineType")%></td>
				    <td><%# Convert.ToDecimal( Eval("averagetasktime")).ToString("f2")%></td>
			    </tr>
         </ItemTemplate>
         <FooterTemplate>
                </tbody>
             </table>
         </FooterTemplate>
        </asp:repeater>
     </td>
    </tr>
    </table>
    <%} %>
    <% if (ReportType == "2")
       { %>
        <table width="100%">
     <tr>
     <td  valign="top" align="center" width="100%" colspan="2">
   
    <asp:chart id="chart2" runat="server" Width="750px" 
            BackImageWrapMode="Scaled" BackSecondaryColor="DimGray" ImageType="Jpeg" 
             Height="350px" Palette="BrightPastel">
             <legends>
				<asp:Legend Enabled="true" IsTextAutoFit="False" Name="Default" 
                    BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold" Title="类型" 
                    Docking="Top"></asp:Legend>
			</legends>
            <borderskin SkinStyle="Emboss"></borderskin>
             <Series>
                <asp:Series Name="Series1" IsValueShownAsLabel="True" XValueType="String" 
                YValueType="Single" ChartArea="ChartArea1" LabelFormat="{f2}">
                </asp:Series>
              </Series>
              <ChartAreas>
                <asp:ChartArea Name="ChartArea1" Area3DStyle-Enable3D="true" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="Transparent" BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
                    <area3dstyle Rotation="10" Inclination="15" WallWidth="2" />
               
                    <axisy LineColor="64, 64, 64, 64"  LabelAutoFitMaxFontSize="8">
						<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
						<MajorGrid LineColor="64, 64, 64, 64" />
					</axisy>
					<axisx LineColor="64, 64, 64, 64"  LabelAutoFitMaxFontSize="8">
						<LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
						<MajorGrid LineColor="64, 64, 64, 64" />
					</axisx>
                </asp:ChartArea>
             </ChartAreas>
            <Titles>
                <asp:Title Font="楷体, 12pt, style=Bold" Name="Title1" Text="每月直接间接工时对比">
                </asp:Title>
            </Titles>
        </asp:chart>
    </td>
    </tr>
     <tr>
        <td align="center">每月直接间接工时对比</td>
        <td align="center">&nbsp;</td>
    </tr>
    <tr>
     <td  valign="top">
        <asp:repeater id="rp2_1" runat="server">
        <HeaderTemplate>
            <table class="table" width="100%" >
            <thead>
                <tr  >  
                    <th width="80" align="center">
                        月份
                    </th>
                    <th width="100">
                        间接工时(小时)
                    </th> 
                    <th  width="80">比例</th>
                    <th width="100">
                        直接工时(小时)
                    </th>  
                    <th  width="80">比例</th>              
                </tr>
            </thead>
            <tbody>
         </HeaderTemplate>
         <ItemTemplate>
                <tr target="sid_user" >			
				    <td><%# Eval("dategroup")%></td>
				    <td><%# Convert.ToDecimal( Eval("间接")).ToString("f2")%></td>
                    <td><%# GetPer2(Eval("间接"), Eval("直接"))%></td>
                    <td><%# Convert.ToDecimal( Eval("直接")).ToString("f2")%></td>
                     <td><%# GetPer2(Eval("直接"), Eval("间接"))%></td>
			    </tr>
         </ItemTemplate>
         <FooterTemplate>
                </tbody>
             </table>
         </FooterTemplate>
        </asp:repeater>
    </td>
     <td valign="top">
        <asp:repeater id="rp2_2" runat="server">
        <HeaderTemplate>
            <table class="table" width="100%" >
            <thead>
                <tr  >  
                    <th width="80" align="center">
                        作业类型
                    </th>
                    <th width="80">
                        工时(小时)
                    </th>
                    <th>比例</th>                
                </tr>
            </thead>
            <tbody>
         </HeaderTemplate>
         <ItemTemplate>
                <tr  >			
				    <td><%# Eval("jobtype")%></td>
				    <td><%# Convert.ToDecimal( Eval("tasktime")).ToString("f2")%></td>
                    <td><%# GetPer2_1(Eval("tasktime"))%></td>
			    </tr>
         </ItemTemplate>
         <FooterTemplate>
                </tbody>
             </table>
         </FooterTemplate>
        </asp:repeater>
     </td>
    </tr>
    </table>
    <%} %>

     <% if(ReportType=="3") {%>
     <table width="100%">
     <tr>
     <td  valign="top">
        <asp:chart id="MachineTaskTimeChart3" runat="server" Width="750px" 
            BackImageWrapMode="Scaled" BackSecondaryColor="DimGray" ImageType="Jpeg" 
             Height="350px" Palette="BrightPastel"><Series>
            <asp:Series Name="Series1" IsValueShownAsLabel="True" XValueType="String" 
                YValueType="Single" ChartArea="ChartArea1" LabelFormat="{f2}"></asp:Series></Series><ChartAreas><asp:ChartArea Name="ChartArea1">
                <AxisY ArrowStyle="Triangle" TextOrientation="Stacked" Title="每台机器平均工时/小时" 
                    TitleAlignment="Far" IntervalAutoMode="VariableCount">
                </AxisY>
                <AxisX ArrowStyle="Triangle" Title="项目(台数)" 
                    TitleFont="新宋体, 10.5pt" IsLabelAutoFit="False" 
                    MaximumAutoSize="50" IntervalAutoMode="VariableCount" 
                    LabelAutoFitMaxFontSize="8" 
                    LabelAutoFitStyle="IncreaseFont, DecreaseFont, StaggeredLabels, LabelsAngleStep30, LabelsAngleStep45, WordWrap" 
                    TitleAlignment="Far" TitleForeColor="Red">
                    <LabelStyle IsEndLabelVisible="False" IsStaggered="True" />
                </AxisX>
                <AxisX2 Enabled="False" IntervalAutoMode="VariableCount">
                </AxisX2>
                <AxisY2 Enabled="False">
                </AxisY2>
                </asp:ChartArea></ChartAreas>
            <Titles>
                <asp:Title Font="楷体, 12pt, style=Bold" Name="Title1" Text="每个项目中每台机器负担工时平均值">
                </asp:Title>
                <asp:Title ForeColor="Red" Name="TaskTimeTitle" Text="从{0}到{1}总工时为{2}小时">
                </asp:Title>
            </Titles>
        </asp:chart>
    </td>
    </tr>
    <tr>
     <td  valign="top">
        <asp:repeater id="rpMachineTaskTimeChart3" runat="server">
        <HeaderTemplate>
            <table class="table" width="100%" >
            <thead>
                <tr  >  
                    <th  align="center">
                        项目(台数)
                    </th>
                    <th >
                        单台直接工时
                    </th>
                    <th >
                        单台间接工时
                    </th>
                    <th >
                       单台合计工时
                    </th>
                </tr>
            </thead>
            <tbody>
         </HeaderTemplate>
         <ItemTemplate>
                <tr target="sid_user" >			
				    <td><a  title="查看此项目各工位所耗工时" href="ODailyReport_GetMachineTaskTime4_GroupBySerialNumber.aspx?WorkDateForm=<%=WorkDateForm %>&WorkDateTo=<%=WorkDateTo %>&SerialNumber=<%# Eval("SerialNumber") %>"" target="_blank" ><%# Eval("SerialNumber")%></a></td>
				    <td><%# Convert.ToDecimal( Eval("zj")).ToString("f2")%></td>
                    <td><%# Convert.ToDecimal( Eval("jj")).ToString("f2")%></td>
				    <td><%# Convert.ToDecimal( Eval("alltasktime")).ToString("f2")%></td>
			    </tr>
         </ItemTemplate>
         <FooterTemplate>
                </tbody>
             </table>
         </FooterTemplate>
        </asp:repeater>
    </td>
    </tr>
    </table>
    <%} %>

     <% if(ReportType=="4") {%>
     <table width="100%">
     <tr>
     <td  valign="top">
        <asp:chart id="MachineTaskTimeChart4" runat="server" Width="600px" 
            BackImageWrapMode="Scaled" BackSecondaryColor="DimGray" ImageType="Jpeg" 
             Height="1200px" Palette="Chocolate"><Series>
            <asp:Series Name="Series1" IsValueShownAsLabel="True" XValueType="String" 
                YValueType="Single" ChartArea="ChartArea1" ChartType="Bar" LabelFormat="{f2}"></asp:Series></Series><ChartAreas>
                    <asp:ChartArea Name="ChartArea1"
                        BackGradientStyle="TopBottom" 
                        BackImageAlignment="Center" BackSecondaryColor="0, 192, 192">
                <AxisY ArrowStyle="Triangle" TextOrientation="Stacked" Title="工时/小时" 
                    IntervalAutoMode="VariableCount">
                </AxisY>
                <AxisX ArrowStyle="Triangle" Title="工位" 
                    TitleFont="新宋体, 10.5pt" IsLabelAutoFit="False" 
                    MaximumAutoSize="50" IntervalAutoMode="VariableCount"
                    LabelAutoFitStyle="IncreaseFont, DecreaseFont, StaggeredLabels, LabelsAngleStep30, LabelsAngleStep45, WordWrap" 
                    TitleAlignment="Far" TitleForeColor="Red">
                    <LabelStyle IsEndLabelVisible="False" IsStaggered="True" />
                </AxisX>
                <AxisX2 Enabled="False" IntervalAutoMode="VariableCount">
                </AxisX2>
                <AxisY2 Enabled="False">
                </AxisY2>
                <area3dstyle Rotation="5" Perspective="1" Enable3D="false" Inclination="10" 
                            IsRightAngleAxes="False" WallWidth="0" />
                </asp:ChartArea></ChartAreas>
            <Titles>
                <asp:Title Font="楷体, 12pt, style=Bold" Name="Title1" Text="按工位统计工时">
                </asp:Title>                
            </Titles>
        </asp:chart>
    </td>
     <td  valign="top">
        <asp:repeater id="rpMachineTaskTimeChart4" runat="server">
        <HeaderTemplate>
            <table class="table" width="100%" layouth="138">
            <thead>
                <tr  >  
                    <th width="80" align="center">
                        工位
                    </th>
                    <th width="80">
                        总工时
                    </th>
                
                </tr>
            </thead>
            <tbody>
         </HeaderTemplate>
         <ItemTemplate>
                <tr target="sid_user" >			
				    <td><a target="navTab" title="工位<%# Eval("GongWei")%>作业日报表" rel="viewdailyserver<%# Eval("GongWei")%>" fresh="true" href="MacModel/ODailyList.aspx?GongWei=<%# Eval("GongWei") %>"><%# Eval("GongWei")%></a></td>
				    <td><%# Convert.ToDecimal( Eval("TaskTime")).ToString("f2")%></td>
			    </tr>
         </ItemTemplate>
         <FooterTemplate>
                </tbody>
             </table>
         </FooterTemplate>
        </asp:repeater>
    </td>
    </tr>
    </table>
    <%} %>
    <% if(ReportType=="5") {%>
     <table width="100%">
     <tr>
     <td  valign="top">
        <asp:chart id="Chart5" runat="server" Width="500px" 
            BackImageWrapMode="Scaled" BackSecondaryColor="DimGray" ImageType="Jpeg" 
             Height="750px" Palette="BrightPastel">
             <legends>
				<asp:Legend Enabled="true" IsTextAutoFit="False" Name="Default" 
                    BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold" Title="直接工作内容" 
                    Docking="Top"></asp:Legend>
			</legends>
             <Series>
            <asp:Series Name="Series1" IsValueShownAsLabel="True" XValueType="String" 
                YValueType="Single" ChartArea="ChartArea1" LabelFormat="{f2}"></asp:Series></Series><ChartAreas><asp:ChartArea Name="ChartArea1">
                <AxisY ArrowStyle="Triangle" TextOrientation="Horizontal" Title="工作内容/小时" 
                    TitleAlignment="Far" IntervalAutoMode="VariableCount">
                </AxisY>
                <AxisX ArrowStyle="Triangle" Title="项目(台数)" 
                    TitleFont="新宋体, 10.5pt" IsLabelAutoFit="False" 
                    MaximumAutoSize="50" IntervalAutoMode="VariableCount" 
                    LabelAutoFitMaxFontSize="8" 
                    LabelAutoFitStyle="IncreaseFont, DecreaseFont, StaggeredLabels, LabelsAngleStep30, LabelsAngleStep45, WordWrap" 
                    TitleAlignment="Far" TitleForeColor="Red">
                    <LabelStyle IsEndLabelVisible="False" IsStaggered="True" />
                </AxisX>
                <AxisX2 Enabled="False" IntervalAutoMode="VariableCount">
                </AxisX2>
                <AxisY2 Enabled="False">
                </AxisY2>
                </asp:ChartArea></ChartAreas>
            <Titles>
                <asp:Title Font="楷体, 12pt, style=Bold" Name="Title1" Text="按项目统计直接工时对比">
                </asp:Title>
            </Titles>
        </asp:chart>
    </td>
    </tr>
    <tr>
        <td style="text-align:center;">
            <asp:GridView ID="GridView5" runat="server" CssClass="table" AutoGenerateColumns="true" Width="100%">
            </asp:GridView>
        </td>
    </tr>
    </table>
    <%} %>
    <% if(ReportType=="6") {%>
     <table width="100%">
     <tr>
     <td  valign="top">
        <asp:chart id="Chart6" runat="server" Width="500px" 
            BackImageWrapMode="Scaled" BackSecondaryColor="DimGray" ImageType="Jpeg" 
             Height="750px" Palette="BrightPastel">
             <legends>
				<asp:Legend Enabled="true" IsTextAutoFit="False" Name="Default" 
                    BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold" Title="工作内容" 
                    Docking="Top"></asp:Legend>
			</legends>
             <Series>
            <asp:Series Name="Series1" IsValueShownAsLabel="True" XValueType="String" 
                YValueType="Single" ChartArea="ChartArea1" LabelFormat="{f2}"></asp:Series></Series><ChartAreas><asp:ChartArea Name="ChartArea1">
                <AxisY ArrowStyle="Triangle" TextOrientation="Horizontal" Title="月份/小时" 
                    TitleAlignment="Far" IntervalAutoMode="VariableCount">
                </AxisY>
                <AxisX ArrowStyle="Triangle" Title="工作内容" 
                    TitleFont="新宋体, 10.5pt" IsLabelAutoFit="False" 
                    MaximumAutoSize="50" IntervalAutoMode="VariableCount" 
                    LabelAutoFitMaxFontSize="8" 
                    LabelAutoFitStyle="IncreaseFont, DecreaseFont, StaggeredLabels, LabelsAngleStep30, LabelsAngleStep45, WordWrap" 
                    TitleAlignment="Far" TitleForeColor="Red">
                    <LabelStyle IsEndLabelVisible="False" IsStaggered="True" />
                </AxisX>
                <AxisX2 Enabled="False" IntervalAutoMode="VariableCount">
                </AxisX2>
                <AxisY2 Enabled="False">
                </AxisY2>
                </asp:ChartArea></ChartAreas>
            <Titles>
                <asp:Title Font="楷体, 12pt, style=Bold" Name="Title1" Text="按月统计工作内容对比表">
                </asp:Title>
            </Titles>
        </asp:chart>
    </td>
     
    </tr>
    <tr>
        <td style="text-align:center;">
            <asp:GridView ID="GridView6" runat="server" CssClass="table" AutoGenerateColumns="true" Width="100%">
            </asp:GridView>
        </td>
    </tr>
    </table>
    <%} %>
   
    </form>
</body>
</html>
